package com.litt.saap.system.po;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import java.io.Serializable;

/**
 * <br>
 * Table:user_op_log<br>
 * @author Hibernate Tools 3.4.0.CR1
 * @version 1.0
 * @since May 11, 2015 3:44:21 PM
 */
@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
@Table(name = "user_op_log")
public class UserOpLog implements Serializable {
	/**
	 * UID
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 序号.
	 */
	private Long id;

	/**
	 * 租户ID.
	 */
	private int tenantId;

	/**
	 * 模块编号.
	 */
	private String moduleCode;

	/**
	 * 功能编号.
	 */
	private String funcCode;

	/**
	 * 数据ID.
	 */
	private int recordId;

	/**
	 * 动态参数.
	 */
	private String params;

	/**
	 * 操作员ID.
	 */
	private int opBy;

	/**
	 * 操作用户名.
	 */
	private String opUsername;

	/**
	 * 操作时间.
	 */
	private Date opDatetime;

	/**
	 * 操作内容.
	 */
	private String opContent;

	public UserOpLog() {
	}

	public UserOpLog(int tenantId, String moduleCode, String funcCode,
			int recordId, int opBy, String opUsername, Date opDatetime,
			String opContent) {
		this.tenantId = tenantId;
		this.moduleCode = moduleCode;
		this.funcCode = funcCode;
		this.recordId = recordId;
		this.opBy = opBy;
		this.opUsername = opUsername;
		this.opDatetime = opDatetime;
		this.opContent = opContent;
	}

	public UserOpLog(int tenantId, String moduleCode, String funcCode,
			int recordId, String params, int opBy, String opUsername,
			Date opDatetime, String opContent) {
		this.tenantId = tenantId;
		this.moduleCode = moduleCode;
		this.funcCode = funcCode;
		this.recordId = recordId;
		this.params = params;
		this.opBy = opBy;
		this.opUsername = opUsername;
		this.opDatetime = opDatetime;
		this.opContent = opContent;
	}

	/**  
	 * Get 序号.
	 * @return 序号
	 */
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	/**
	 * Set 序号.
	 * @param id 序号
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**  
	 * Get 租户ID.
	 * @return 租户ID
	 */

	@Column(name = "TENANT_ID", nullable = false)
	public int getTenantId() {
		return this.tenantId;
	}

	/**
	 * Set 租户ID.
	 * @param tenantId 租户ID
	 */
	public void setTenantId(int tenantId) {
		this.tenantId = tenantId;
	}

	/**  
	 * Get 模块编号.
	 * @return 模块编号
	 */

	@Column(name = "MODULE_CODE", nullable = false, length = 50)
	public String getModuleCode() {
		return this.moduleCode;
	}

	/**
	 * Set 模块编号.
	 * @param moduleCode 模块编号
	 */
	public void setModuleCode(String moduleCode) {
		this.moduleCode = moduleCode;
	}

	/**  
	 * Get 功能编号.
	 * @return 功能编号
	 */

	@Column(name = "FUNC_CODE", nullable = false, length = 50)
	public String getFuncCode() {
		return this.funcCode;
	}

	/**
	 * Set 功能编号.
	 * @param funcCode 功能编号
	 */
	public void setFuncCode(String funcCode) {
		this.funcCode = funcCode;
	}

	/**  
	 * Get 数据ID.
	 * @return 数据ID
	 */

	@Column(name = "RECORD_ID", nullable = false)
	public int getRecordId() {
		return this.recordId;
	}

	/**
	 * Set 数据ID.
	 * @param recordId 数据ID
	 */
	public void setRecordId(int recordId) {
		this.recordId = recordId;
	}

	/**  
	 * Get 动态参数.
	 * @return 动态参数
	 */

	@Column(name = "PARAMS", length = 2000)
	public String getParams() {
		return this.params;
	}

	/**
	 * Set 动态参数.
	 * @param params 动态参数
	 */
	public void setParams(String params) {
		this.params = params;
	}

	/**  
	 * Get 操作员ID.
	 * @return 操作员ID
	 */

	@Column(name = "OP_BY", nullable = false)
	public int getOpBy() {
		return this.opBy;
	}

	/**
	 * Set 操作员ID.
	 * @param opBy 操作员ID
	 */
	public void setOpBy(int opBy) {
		this.opBy = opBy;
	}

	/**  
	 * Get 操作用户名.
	 * @return 操作用户名
	 */

	@Column(name = "OP_USERNAME", nullable = false, length = 50)
	public String getOpUsername() {
		return this.opUsername;
	}

	/**
	 * Set 操作用户名.
	 * @param opUsername 操作用户名
	 */
	public void setOpUsername(String opUsername) {
		this.opUsername = opUsername;
	}

	/**  
	 * Get 操作时间.
	 * @return 操作时间
	 */

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "OP_DATETIME", nullable = false, length = 19)
	public Date getOpDatetime() {
		return this.opDatetime;
	}

	/**
	 * Set 操作时间.
	 * @param opDatetime 操作时间
	 */
	public void setOpDatetime(Date opDatetime) {
		this.opDatetime = opDatetime;
	}

	/**  
	 * Get 操作内容.
	 * @return 操作内容
	 */

	@Column(name = "OP_CONTENT", nullable = false, length = 2000)
	public String getOpContent() {
		return this.opContent;
	}

	/**
	 * Set 操作内容.
	 * @param opContent 操作内容
	 */
	public void setOpContent(String opContent) {
		this.opContent = opContent;
	}

}
